import request from "@/api/request";

export default {
    /**
     * * 试卷信息分页接口  培训师创建的只能自己看到
     * @param params
     * @returns {*}
     */
    getExamPaperInfo:(params)=> {
        return request({
            url: "/exam/paper/page",
            method: "post",
            data: params
        })
    },
    /**
     * * 试卷信息分页接口  培训师创建的只能自己看到
     * @param params
     * @returns {*}
     */
    getAllPaper:(params)=> {
        return request({
            url: "/exam/paper/get/all",
            method: "post",
            data: params
        })
    },

    /**
     * 创建试卷
     * @returns {*}
     */
    createExamPaper:(params)=>{
        return request({
            url:"/exam/paper/create",
            method:"post",
           data:params
        })
    },
    /**
     * 修改试卷实体
     */
    updateExamPaper:(params)=>{
        return request({
            url:"/exam/paper/update",
            method:"post",
            data:params
        })
    },
    /**
     * 组卷管理中，“禁用”按钮功能
     */
    deleteExamPaper:(params)=>{
        return request({
            url:"/exam/paper/delete",
            method:"post",
            data:{
                paperId:params
            }
        })
    },
    /**
     * 获取试卷详细信息，包含答案；但编程题无答案
     */
    paperDetailedInfo:(param, paperType)=>{
        return request({
            url:"/exam/situation/paper/get",
            method:"get",
            params: {
                paperId:param,
                paperType: paperType
            }
        })
    },
    /**
     * 自由组卷
     * @returns {*}
     */
    randomExamPaper:(params)=>{
        return request({
            url:"/exam/paper/random",
            method:"post",
            data :params
        })
    }
}
